package com.me.mygdxgame;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

public abstract class AbstractScreen implements  Screen
{
	protected final Tyrian game;
	protected final BitmapFont font;
	protected final SpriteBatch batch;
	//ham tao
	public AbstractScreen(Tyrian game )
	{
	    this.game = game;
	    this.font = new BitmapFont();
	    this.batch = new SpriteBatch();
	}
	
	@Override
	public void show()
	{
	}
	
	@Override
	public void resize(
	    int width,
	    int height )
	{
	}
	
	@Override
	public void render(
	    float delta )
	{
	    // xóa đen màn hình trước khi vẽ thứ gì đó lên màu trắng thì cho 1 từ a-> z :v
	    Gdx.gl.glClearColor( 0f, 0f, 0f, 1f );
	    Gdx.gl.glClear( GL20.GL_COLOR_BUFFER_BIT );
	}
	
	@Override
	public void hide()
	{
	}
	
	@Override
	public void pause()
	{
	}
	
	@Override
	public void resume()
	{
	}
	
	@Override
	public void dispose()
	{
	    font.dispose();
	    batch.dispose();
	}
}
